package j3dscene;

/**
 * Custom userdata object for storing the name and a priority value for each
 * pickable object. The smaller the priority value the more important 
 * the object.
 * @author Dominik K.
 * @author Steffen G.
 */
public class PrioUserData {
    private String name;
    private int priority;
   
    /**
     * Constructor
     */
    public PrioUserData() {
        this.name = "noname";
        this.priority = 0;
    }
    
    /**
     * Constructor with param
     * 
     * @param name
     * @param priority 
     */
    public PrioUserData(String name, int priority) {
        this.name = name;
        this.priority = priority;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the priority
     */
    public int getPriority() {
        return priority;
    }

    /**
     * @param priority the priority to set
     */
    public void setPriority(int priority) {
        this.priority = priority;
    }
    
    /**
     * printing the Return Statement for Elements
     * 
     * @return String with priority and name value
     */
    @Override
    public String toString() {
        return "Prio: " + this.priority + ", Name: " + this.name;
    }
}
